home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / include / string / nsTAString.h < prev    next >
C/C++ Source or Header  |  2006-05-08  |  23KB  |  583 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* vim:set ts=2 sw=2 sts=2 et cindent: */
  3. /* ***** BEGIN LICENSE BLOCK *****
  4.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5.  *
  6.  * The contents of this file are subject to the Mozilla Public License Version
  7.  * 1.1 (the "License"); you may not use this file except in compliance with
  8.  * the License. You may obtain a copy of the License at
  9.  * http://www.mozilla.org/MPL/
  10.  *
  11.  * Software distributed under the License is distributed on an "AS IS" basis,
  12.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  13.  * for the specific language governing rights and limitations under the
  14.  * License.
  15.  *
  16.  * The Original Code is Mozilla.
  17.  *
  18.  * The Initial Developer of the Original Code is IBM Corporation.
  19.  * Portions created by IBM Corporation are Copyright (C) 2003
  20.  * IBM Corporation. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *   Scott Collins <scc@mozilla.org> (original author)
  24.  *   Darin Fisher <darin@meer.net>
  25.  *
  26.  * Alternatively, the contents of this file may be used under the terms of
  27.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  28.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  29.  * in which case the provisions of the GPL or the LGPL are applicable instead
  30.  * of those above. If you wish to allow use of your version of this file only
  31.  * under the terms of either the GPL or the LGPL, and not to allow others to
  32.  * use your version of this file under the terms of the MPL, indicate your
  33.  * decision by deleting the provisions above and replace them with the notice
  34.  * and other provisions required by the GPL or the LGPL. If you do not delete
  35.  * the provisions above, a recipient may use your version of this file under
  36.  * the terms of any one of the MPL, the GPL or the LGPL.
  37.  *
  38.  * ***** END LICENSE BLOCK ***** */
  39.  
  40. #ifndef MOZILLA_INTERNAL_API
  41. #error Cannot use internal string classes without MOZILLA_INTERNAL_API defined. Use the frozen header nsStringAPI.h instead.
  42. #endif
  43.  
  44.   /**
  45.    * The base for string comparators
  46.    */
  47. class NS_COM nsTStringComparator_CharT
  48.   {
  49.     public:
  50.       typedef CharT char_type;
  51.  
  52.       nsTStringComparator_CharT() {}
  53.  
  54.       virtual int operator()( const char_type*, const char_type*, PRUint32 length ) const = 0;
  55.       virtual int operator()( char_type, char_type ) const = 0;
  56.   };
  57.  
  58.  
  59.   /**
  60.    * The default string comparator (case-sensitive comparision)
  61.    */
  62. class NS_COM nsTDefaultStringComparator_CharT
  63.     : public nsTStringComparator_CharT
  64.   {
  65.     public:
  66.       typedef CharT char_type;
  67.  
  68.       nsTDefaultStringComparator_CharT() {}
  69.  
  70.       virtual int operator()( const char_type*, const char_type*, PRUint32 length ) const;
  71.       virtual int operator()( char_type, char_type ) const;
  72.   };
  73.  
  74.  
  75.   /**
  76.    * nsTAString is the most abstract class in the string hierarchy.
  77.    *
  78.    * In its original inception, nsTAString was designed to allow the data
  79.    * storage for a string to be separated into multiple fragments.  This was
  80.    * intended to enable lazy string flattening or avoid string flattening
  81.    * altogether in some cases.  This abstraction, however, meant that every
  82.    * single string operation (including simple operations such as IsEmpty() and
  83.    * BeginReading()) required virtual function calls.  A virtual destructor was
  84.    * also required.  This not only meant additional overhead for invoking
  85.    * string methods but also added to additional codesize at every callsite (to
  86.    * load the virtual function address).
  87.    *
  88.    * Today nsTAString exists mainly for backwards compatibility of the string
  89.    * API.  It is restricted to representing a contiguous array of characters,
  90.    * where the character array is not necessarily null-terminated.  Moreover,
  91.    * since nsTAString's virtual function table was frozen for Mozilla 1.0,
  92.    * nsTAString necessarily maintains ABI compatibility with older versions of
  93.    * Gecko.  (nsTObsoleteAString provides that frozen ABI.  See
  94.    * nsObsoleteAString.h for a description of how we solve the ABI
  95.    * compatibility requirement while eliminating virtual function calls on
  96.    * nsTAString.)
  97.    *
  98.    * XPIDL still generates C++ header files with references to nsTAStrings, so
  99.    * nsTAString will still be heavily used in real code.
  100.    *
  101.    * If the opportunity to break ABI compatibility with Mozilla 1.0 were to
  102.    * ever arise, our first move should be to make nsTAString equate to
  103.    * nsTSubstring.  This may in fact be an option today for some Gecko-based
  104.    * products.
  105.    */
  106. class nsTAString_CharT
  107.   {
  108.     public:
  109.  
  110.       typedef CharT                                  char_type;
  111.       typedef nsCharTraits<char_type>                char_traits;
  112.  
  113.       typedef char_traits::incompatible_char_type    incompatible_char_type;
  114.  
  115.       typedef nsTAString_CharT                       self_type;
  116.       typedef nsTAString_CharT                       abstract_string_type;
  117.       typedef nsTObsoleteAString_CharT               obsolete_string_type;
  118.       typedef nsTSubstring_CharT                     substring_type;
  119.       typedef nsTSubstringTuple_CharT                substring_tuple_type;
  120.  
  121.       typedef nsReadingIterator<char_type>           const_iterator;
  122.       typedef nsWritingIterator<char_type>           iterator;
  123.  
  124.       typedef nsTStringComparator_CharT              comparator_type;
  125.  
  126.       typedef PRUint32                               size_type;
  127.       typedef PRUint32                               index_type;
  128.  
  129. #ifdef MOZ_V1_STRING_ABI
  130.     public:
  131.  
  132.         // this acts like a virtual destructor
  133.       NS_COM NS_FASTCALL ~nsTAString_CharT();
  134.  
  135.  
  136.         /**
  137.          * BeginReading/EndReading can be used to get immutable access to the
  138.          * string's underlying buffer.  EndReading returns a pointer to the
  139.          * end of the string's buffer.  nsReadableUtils.h provides a collection
  140.          * of utility functions that work with these iterators.
  141.          */
  142.  
  143.       inline const_iterator& BeginReading( const_iterator& iter ) const
  144.         {
  145.           size_type len = GetReadableBuffer(&iter.mStart);
  146.           iter.mEnd = iter.mStart + len;
  147.           iter.mPosition = iter.mStart;
  148.           return iter;
  149.         }
  150.  
  151.       inline const_iterator& EndReading( const_iterator& iter ) const
  152.         {
  153.           size_type len = GetReadableBuffer(&iter.mStart);
  154.           iter.mEnd = iter.mStart + len;
  155.           iter.mPosition = iter.mEnd;
  156.           return iter;
  157.         }
  158.  
  159.  
  160.         /**
  161.          * BeginWriting/EndWriting can be used to get mutable access to the
  162.          * string's underlying buffer.  EndWriting returns a pointer to the
  163.          * end of the string's buffer.  This iterator API cannot be used to
  164.          * grow a buffer.  Use SetLength to resize the string's buffer.
  165.          */
  166.  
  167.       inline iterator& BeginWriting( iterator& iter )
  168.         {
  169.           size_type len = GetWritableBuffer(&iter.mStart);
  170.           iter.mEnd = iter.mStart + len;
  171.           iter.mPosition = iter.mStart;
  172.           return iter;
  173.         }
  174.  
  175.       inline iterator& EndWriting( iterator& iter )
  176.         {
  177.           size_type len = GetWritableBuffer(&iter.mStart);
  178.           iter.mEnd = iter.mStart + len;
  179.           iter.mPosition = iter.mEnd;
  180.           return iter;
  181.         }
  182.  
  183.  
  184.         /**
  185.          * Length checking functions.  IsEmpty is a helper function to avoid
  186.          * writing code like: |if (str.Length() == 0)|
  187.          */
  188.  
  189.       NS_COM size_type NS_FASTCALL Length() const;
  190.       PRBool IsEmpty() const { return Length() == 0; }
  191.  
  192.  
  193.         /**
  194.          * String equality tests.  Pass a string comparator if you want to
  195.          * control how the strings are compared.  By default, a binary
  196.          * "case-sensitive" comparision is performed.
  197.          */
  198.  
  199.       NS_COM PRBool NS_FASTCALL Equals( const self_type& ) const;
  200.       NS_COM PRBool NS_FASTCALL Equals( const self_type&, const comparator_type& ) const;
  201.       NS_COM PRBool NS_FASTCALL Equals( const char_type* ) const;
  202.       NS_COM PRBool NS_FASTCALL Equals( const char_type*, const comparator_type& ) const;
  203.  
  204.         /**
  205.          * An efficient comparison with ASCII that can be used even
  206.          * for wide strings. Call this version when you know the
  207.          * length of 'data'.
  208.          */
  209.       NS_COM PRBool NS_FASTCALL EqualsASCII( const char* data, size_type len ) const;
  210.         /**
  211.          * An efficient comparison with ASCII that can be used even
  212.          * for wide strings. Call this version when 'data' is
  213.          * null-terminated.
  214.          */
  215.       NS_COM PRBool NS_FASTCALL EqualsASCII( const char* data ) const;
  216.  
  217.     // EqualsLiteral must ONLY be applied to an actual literal string.
  218.     // Do not attempt to use it with a regular char* pointer, or with a char
  219.     // array variable.
  220.     // The template trick to acquire the array length at compile time without
  221.     // using a macro is due to Corey Kosak, with much thanks.
  222. #ifdef NS_DISABLE_LITERAL_TEMPLATE
  223.       inline PRBool EqualsLiteral( const char* str ) const
  224.         {
  225.           return EqualsASCII(str);
  226.         }
  227. #else
  228.       template<int N>
  229.       inline PRBool EqualsLiteral( const char (&str)[N] ) const
  230.         {
  231.           return EqualsASCII(str, N-1);
  232.         }
  233.       template<int N>
  234.       inline PRBool EqualsLiteral( char (&str)[N] ) const
  235.         {
  236.           const char* s = str;
  237.           return EqualsASCII(s, N-1);
  238.         }
  239. #endif
  240.  
  241.     // The LowerCaseEquals methods compare the lower case version of
  242.     // this string to some ASCII/Literal string. The ASCII string is
  243.     // *not* lowercased for you. If you compare to an ASCII or literal
  244.     // string that contains an uppercase character, it is guaranteed to
  245.     // return false. We will throw assertions too.
  246.       NS_COM PRBool NS_FASTCALL LowerCaseEqualsASCII( const char* data, size_type len ) const;
  247.       NS_COM PRBool NS_FASTCALL LowerCaseEqualsASCII( const char* data ) const;
  248.  
  249.     // LowerCaseEqualsLiteral must ONLY be applied to an actual
  250.     // literal string.  Do not attempt to use it with a regular char*
  251.     // pointer, or with a char array variable. Use
  252.     // LowerCaseEqualsASCII for them.
  253. #ifdef NS_DISABLE_LITERAL_TEMPLATE
  254.       inline PRBool LowerCaseEqualsLiteral( const char* str ) const
  255.         {
  256.           return LowerCaseEqualsASCII(str);
  257.         }
  258. #else
  259.       template<int N>
  260.       inline PRBool LowerCaseEqualsLiteral( const char (&str)[N] ) const
  261.         {
  262.           return LowerCaseEqualsASCII(str, N-1);
  263.         }
  264.       template<int N>
  265.       inline PRBool LowerCaseEqualsLiteral( char (&str)[N] ) const
  266.         {
  267.           const char* s = str;
  268.           return LowerCaseEqualsASCII(s, N-1);
  269.         }
  270. #endif
  271.  
  272.         /**
  273.          * A string always references a non-null data pointer.  In some
  274.          * applications (e.g., the DOM) it is necessary for a string class
  275.          * to have some way to distinguish an empty string from a null (or
  276.          * void) string.  These methods enable support for the concept of
  277.          * a void string.
  278.          */
  279.  
  280.       NS_COM PRBool NS_FASTCALL IsVoid() const;
  281.       NS_COM void NS_FASTCALL SetIsVoid( PRBool );
  282.  
  283.  
  284.         /**
  285.          * This method returns true if the string's underlying buffer is
  286.          * null-terminated.  This should rarely be needed by applications.
  287.          * The PromiseFlatTString method should be used to ensure that a
  288.          * string's underlying buffer is null-terminated.
  289.          */
  290.  
  291.       NS_COM PRBool NS_FASTCALL IsTerminated() const;
  292.  
  293.  
  294.         /**
  295.          * These are contant time since nsTAString uses flat storage
  296.          */
  297.       NS_COM char_type NS_FASTCALL First() const;
  298.       NS_COM char_type NS_FASTCALL Last() const;
  299.  
  300.  
  301.         /**
  302.          * Returns the number of occurances of the given character.
  303.          */
  304.       NS_COM size_type NS_FASTCALL CountChar( char_type ) const;
  305.  
  306.  
  307.         /**
  308.          * Locates the offset of the first occurance of the character.  Pass a
  309.          * non-zero offset to control where the search begins.
  310.          */
  311.  
  312.       NS_COM PRInt32 NS_FASTCALL FindChar( char_type, index_type offset = 0 ) const;
  313.  
  314.  
  315.         /**
  316.          * SetCapacity is not required to do anything; however, it can be used
  317.          * as a hint to the implementation to reduce allocations.
  318.          *
  319.          * SetCapacity(0) is a suggestion to discard all associated storage.
  320.          */
  321.       NS_COM void NS_FASTCALL SetCapacity( size_type );
  322.  
  323.  
  324.         /**
  325.          * XXX talk to dbaron about this comment.  we do need a method that
  326.          * XXX allows someone to resize a string's buffer so that it can be
  327.          * XXX populated using writing iterators.  SetLength seems to be the
  328.          * XXX right method for the job, and we do use it in this capacity
  329.          * XXX in certain places.
  330.          *
  331.          * SetLength is used in two ways:
  332.          *   1) to |Cut| a suffix of the string;
  333.          *   2) to prepare to |Append| or move characters around.
  334.          *
  335.          * External callers are not allowed to use |SetLength| in this
  336.          * latter capacity, and should prefer |Truncate| for the former.
  337.          * In other words, |SetLength| is deprecated for all use outside
  338.          * of the string library and the internal use may at some point
  339.          * be replaced as well.
  340.          *
  341.          * This distinction makes me think the two different uses should
  342.          * be split into two distinct functions.
  343.          */
  344.       NS_COM void NS_FASTCALL SetLength( size_type );
  345.  
  346.  
  347.         /**
  348.          * Can't use |Truncate| to make a string longer!
  349.          */
  350.       void Truncate( size_type aNewLength=0 )
  351.         {
  352.           NS_ASSERTION(aNewLength <= Length(), "Truncate cannot make string longer");
  353.           SetLength(aNewLength);
  354.         }
  355.  
  356.  
  357.         /**
  358.          * |Assign| and |operator=| make |this| equivalent to the string or
  359.          * buffer given as an argument.  If possible, they do this by sharing
  360.          * a reference counted buffer (see |nsTSubstring|).  If not, they copy
  361.          * the buffer into their own buffer.
  362.          */
  363.  
  364.       NS_COM void NS_FASTCALL Assign( const self_type& readable );
  365.       NS_COM void NS_FASTCALL Assign( const substring_tuple_type& tuple );
  366.       NS_COM void NS_FASTCALL Assign( const char_type* data );
  367.       NS_COM void NS_FASTCALL Assign( const char_type* data, size_type length );
  368.       NS_COM void NS_FASTCALL Assign( char_type c );
  369.  
  370.       NS_COM void NS_FASTCALL AssignASCII( const char* data, size_type length );
  371.       NS_COM void NS_FASTCALL AssignASCII( const char* data );
  372.  
  373.     // AssignLiteral must ONLY be applied to an actual literal string.
  374.     // Do not attempt to use it with a regular char* pointer, or with a char
  375.     // array variable. Use AssignASCII for those.
  376. #ifdef NS_DISABLE_LITERAL_TEMPLATE
  377.       void AssignLiteral( const char* str )
  378.                   { AssignASCII(str); }
  379. #else
  380.       template<int N>
  381.       void AssignLiteral( const char (&str)[N] )
  382.                   { AssignASCII(str, N-1); }
  383.       template<int N>
  384.       void AssignLiteral( char (&str)[N] )
  385.                   { AssignASCII(str, N-1); }
  386. #endif
  387.  
  388.         // copy-assignment operator.  I must define my own if I don't want the compiler to make me one
  389.       self_type& operator=( const self_type& readable )                                             { Assign(readable); return *this; }
  390.       self_type& operator=( const substring_tuple_type& tuple )                                     { Assign(tuple); return *this; }
  391.       self_type& operator=( const char_type* data )                                                 { Assign(data); return *this; }
  392.       self_type& operator=( char_type c )                                                           { Assign(c); return *this; }
  393.  
  394.  
  395.  
  396.         /**
  397.          * |Append|, |operator+=| are used to add characters to the end of this string.
  398.          */ 
  399.  
  400.       NS_COM void NS_FASTCALL Append( const self_type& readable );
  401.       NS_COM void NS_FASTCALL Append( const substring_tuple_type& tuple );
  402.       NS_COM void NS_FASTCALL Append( const char_type* data );
  403.       NS_COM void NS_FASTCALL Append( const char_type* data, size_type length );
  404.       NS_COM void NS_FASTCALL Append( char_type c );
  405.  
  406.       NS_COM void NS_FASTCALL AppendASCII( const char* data, size_type length );
  407.       NS_COM void NS_FASTCALL AppendASCII( const char* data );
  408.  
  409.     // AppendLiteral must ONLY be applied to an actual literal string.
  410.     // Do not attempt to use it with a regular char* pointer, or with a char
  411.     // array variable. Use AppendASCII for those.
  412. #ifdef NS_DISABLE_LITERAL_TEMPLATE
  413.       void AppendLiteral( const char* str )
  414.                   { AppendASCII(str); }
  415. #else
  416.       template<int N>
  417.       void AppendLiteral( const char (&str)[N] )
  418.                   { AppendASCII(str, N-1); }
  419.       template<int N>
  420.       void AppendLiteral( char (&str)[N] )
  421.                   { AppendASCII(str, N-1); }
  422. #endif
  423.  
  424.       self_type& operator+=( const self_type& readable )                                            { Append(readable); return *this; }
  425.       self_type& operator+=( const substring_tuple_type& tuple )                                    { Append(tuple); return *this; }
  426.       self_type& operator+=( const char_type* data )                                                { Append(data); return *this; }
  427.       self_type& operator+=( char_type c )                                                          { Append(c); return *this; }
  428.  
  429.  
  430.         /**
  431.          * |Insert| is used to add characters into this string at a given position.
  432.          * NOTE: It's a shame the |pos| parameter isn't at the front of the arg list.
  433.          */ 
  434.  
  435.       NS_COM void NS_FASTCALL Insert( const self_type& readable, index_type pos );
  436.       NS_COM void NS_FASTCALL Insert( const substring_tuple_type& tuple, index_type pos );
  437.       NS_COM void NS_FASTCALL Insert( const char_type* data, index_type pos );
  438.       NS_COM void NS_FASTCALL Insert( const char_type* data, index_type pos, size_type length );
  439.       NS_COM void NS_FASTCALL Insert( char_type c, index_type pos );
  440.  
  441.  
  442.         /**
  443.          * |Cut| is used to remove a range of characters from this string.
  444.          */
  445.  
  446.       NS_COM void NS_FASTCALL Cut( index_type cutStart, size_type cutLength );
  447.  
  448.       
  449.         /**
  450.          * |Replace| is used overwrite a range of characters from this string.
  451.          */
  452.  
  453.       NS_COM void NS_FASTCALL Replace( index_type cutStart, size_type cutLength, const self_type& readable );
  454.       NS_COM void NS_FASTCALL Replace( index_type cutStart, size_type cutLength, const substring_tuple_type& readable );
  455.  
  456.       
  457.         /**
  458.          * this is public to support automatic conversion of tuple to abstract
  459.          * string, which is necessary to support our API.
  460.          */
  461.       nsTAString_CharT(const substring_tuple_type& tuple)
  462.         : mVTable(obsolete_string_type::sCanonicalVTable)
  463.         , mData(nsnull)
  464.         , mLength(0)
  465.         , mFlags(0)
  466.         {
  467.           Assign(tuple);
  468.         }
  469.  
  470.     protected:
  471.  
  472.       friend class nsTSubstringTuple_CharT;
  473.  
  474.       // GCC 3.2 erroneously needs these (even though they are subclasses!)
  475.       friend class nsTSubstring_CharT;
  476.       friend class nsTDependentSubstring_CharT;
  477.       friend class nsTPromiseFlatString_CharT;
  478.  
  479.         /**
  480.          * the address of our virtual function table.  required for backwards
  481.          * compatibility with Mozilla 1.0 frozen nsAC?String interface.
  482.          */
  483.       const void* mVTable;
  484.  
  485.         /**
  486.          * these fields are "here" only when mVTable == sCanonicalVTable.
  487.          *
  488.          * they exist to support automatic construction of a nsTAString
  489.          * from a nsTSubstringTuple.
  490.          */
  491.       char_type*  mData;
  492.       size_type   mLength;
  493.       PRUint32    mFlags;
  494.  
  495.         /**
  496.          * nsTAString must be subclassed before it can be instantiated.
  497.          */
  498.       nsTAString_CharT(char_type* data, size_type length, PRUint32 flags)
  499.         : mVTable(obsolete_string_type::sCanonicalVTable)
  500.         , mData(data)
  501.         , mLength(length)
  502.         , mFlags(flags)
  503.         {}
  504.  
  505.         /**
  506.          * optional ctor for use by subclasses.
  507.          *
  508.          * NOTE: mData and mLength are intentionally left uninitialized.
  509.          */
  510.       explicit
  511.       nsTAString_CharT(PRUint32 flags)
  512.         : mVTable(obsolete_string_type::sCanonicalVTable)
  513.         , mFlags(flags)
  514.         {}
  515.  
  516.         /**
  517.          * get pointer to internal string buffer (may not be null terminated).
  518.          * return length of buffer.
  519.          */
  520.       NS_COM size_type NS_FASTCALL GetReadableBuffer( const char_type **data ) const;
  521.       NS_COM size_type NS_FASTCALL GetWritableBuffer(       char_type **data );
  522.  
  523.         /**
  524.          * returns true if this tuple is dependent on (i.e., overlapping with)
  525.          * the given char sequence.
  526.          */
  527.       PRBool NS_FASTCALL IsDependentOn(const char_type *start, const char_type *end) const;
  528.  
  529.         /**
  530.          * we can be converted to a const nsTSubstring (dependent on this)
  531.          */
  532.       const substring_type NS_FASTCALL ToSubstring() const;
  533.  
  534.         /**
  535.          * type cast helpers
  536.          */
  537.  
  538.       const obsolete_string_type* AsObsoleteString() const
  539.         {
  540.           return NS_REINTERPRET_CAST(const obsolete_string_type*, this);
  541.         }
  542.  
  543.       obsolete_string_type* AsObsoleteString()
  544.         {
  545.           return NS_REINTERPRET_CAST(obsolete_string_type*, this);
  546.         }
  547.  
  548.       const substring_type* AsSubstring() const
  549.         {
  550.           return NS_REINTERPRET_CAST(const substring_type*, this);
  551.         }
  552.  
  553.       substring_type* AsSubstring()
  554.         {
  555.           return NS_REINTERPRET_CAST(substring_type*, this);
  556.         }
  557.  
  558.     private:
  559.  
  560.         // GCC 2.95.3, EGCS-2.91.66, Sun Workshop/Forte, and IBM VisualAge C++
  561.         // require a public copy-constructor in order to support automatic
  562.         // construction of a nsTAString from a nsTSubstringTuple.  I believe
  563.         // enabling the default copy-constructor is harmless, but I do not want
  564.         // it to be enabled by default because that might tempt people into
  565.         // using it (where it would be invalid).
  566. #if !defined(__SUNPRO_CC) && \
  567.    !(defined(_AIX) && defined(__IBMCPP__)) && \
  568.    (!defined(__GNUC__) || __GNUC__ > 2 || __GNUC_MINOR__ > 95)
  569.  
  570.         // NOT TO BE IMPLEMENTED
  571.       nsTAString_CharT( const self_type& );
  572.  
  573. #endif
  574.  
  575.         // NOT TO BE IMPLEMENTED
  576.       void operator=     ( incompatible_char_type );
  577.       void Assign        ( incompatible_char_type );
  578.       void operator+=    ( incompatible_char_type );
  579.       void Append        ( incompatible_char_type );
  580.       void Insert        ( incompatible_char_type, index_type );
  581. #endif
  582.   };
  583.